import cv2
import numpy as np

img=cv2.imread("3/lena_color.jpg")

h,w=img.shape[:2]
M=cv2.getRotationMatrix2D((w/2,h/2),-60,0.4)
result1=cv2.warpAffine(img,M,(h,w))

x=50
y=25
M=np.float32([[1,0,x],[0,1,y]])
result2=cv2.warpAffine(result1,M,(w,h))

cv2.imshow("img",img)
cv2.imshow("result",result2)
cv2.waitKey()
cv2.destroyAllWindows()